package com.co.recommend.dao;

import com.co.recommend.pojo.Sub;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

@Repository
public interface SubMapper extends BaseMapper<Sub> {

    //根据userName查询upName
    @Select("select pubname FROM us_sub where subname =#{subName}")
    public List<String> findPubName(String subName);

    //根据upName查询subName
    @Select("select subname FROM us_sub where pubname =#{pubName}")
    public List<String> findSubName(String pubName);
}
